<template>
    <el-tabs type="card" v-model="currentTabName">
        <el-tab-pane label="订单" name="order">
            <BaseJsonInfoPanel />
        </el-tab-pane>
        <el-tab-pane label="模型" name="model">
            <ModelInfoPanel />
        </el-tab-pane>
        <el-tab-pane label="Json" name="json">
            <JsonPanel />
        </el-tab-pane>
    </el-tabs>
</template>

<script lang="ts">
import { defineComponent, onMounted, ref, watch } from 'vue';
import BaseJsonInfoPanel from './BaseJsonInfoPanel.vue';
import JsonPanel from './JsonPanel.vue';
import ModelInfoPanel from './ModelInfoPanel.vue';
import { useCurrentModelStore } from '@/stores/current';

export default defineComponent({
    components:{ BaseJsonInfoPanel , JsonPanel , ModelInfoPanel},
    setup(){
        const currentTabName = ref("order");
        const store = useCurrentModelStore();
        watch(()=>store.currentRightTabNameTick,(n,o)=>{
            currentTabName.value = store.currentRightTabName;
            // if(n){
            // }
        })

        return { currentTabName }
    },
    
})
</script>
